<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: C:/code/SkyGameEngine2d/src/render/IRender.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_e488ee1cea97fb16abdb5ccc78d2123b.html">render</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">IRender.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef RenderInterface_h__</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define RenderInterface_h__</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="keyword">namespace </span>SkyEngine2d</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;{</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;    <span class="keyword">class </span>RenderCommand;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;    <span class="keyword">class </span>Color4f;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;    <span class="keyword">class </span>IDirectRender;</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_i_render.html">   13</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_sky_engine2d_1_1_i_render.html">IRender</a></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    {</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#a448aa32aadb79f25d9ac962f256f6acc">renderBegin</a>() = 0;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="keyword">virtual</span> HRESULT <a class="code" href="class_sky_engine2d_1_1_i_render.html#a0b3dd7cc95c8612468b67e2659aad82c">renderEnd</a>() = 0;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#a8cad73ae2d9fc189a9a87e4aff40dd36">render</a>() = 0;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#a528b41b7f60df2b6a9026fc17ec42558">setClearColor</a>(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_color4f.html">Color4f</a>&amp; clear_color) = 0;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#a62cb8bc8958d370277715b08a0aee3bc">isInit</a>()<span class="keyword">const</span> = 0;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#aff991fbdd144dd0b50c2625e291598ce">getDrawCallCount</a>() = 0;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#afa35f512478d9b363f29cbb71ab4ad3f">getDrawCmdCount</a>() = 0;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#a33f2959a1c486554d90386e01711a6ce">getVertexCount</a>() = 0;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_i_render.html#a68d7983ccd9e7919f146a397090e3ac6">addRenderCommand</a>(<a class="code" href="class_sky_engine2d_1_1_render_command.html">RenderCommand</a>* cmd) = 0;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="class_sky_engine2d_1_1_i_direct_render.html">IDirectRender</a>* <a class="code" href="class_sky_engine2d_1_1_i_render.html#a4a7381f687edce45a2bcfd9631055543">getDirectRender</a>() = 0;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    };</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;}</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#endif // RenderInterface_h__</span></div><div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a4a7381f687edce45a2bcfd9631055543"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a4a7381f687edce45a2bcfd9631055543">SkyEngine2d::IRender::getDirectRender</a></div><div class="ttdeci">virtual IDirectRender * getDirectRender()=0</div><div class="ttdoc">获取 direct 接口</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a448aa32aadb79f25d9ac962f256f6acc"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a448aa32aadb79f25d9ac962f256f6acc">SkyEngine2d::IRender::renderBegin</a></div><div class="ttdeci">virtual void renderBegin()=0</div><div class="ttdoc">开始渲染</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_afa35f512478d9b363f29cbb71ab4ad3f"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#afa35f512478d9b363f29cbb71ab4ad3f">SkyEngine2d::IRender::getDrawCmdCount</a></div><div class="ttdeci">virtual int getDrawCmdCount()=0</div><div class="ttdoc">获取当前帧的绘制命令总数</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_color4f_html"><div class="ttname"><a href="class_sky_engine2d_1_1_color4f.html">SkyEngine2d::Color4f</a></div><div class="ttdoc">颜色 r,g,b,a 取值为 [0,1]</div><div class="ttdef"><b>Definition:</b> Color.h:223</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html">SkyEngine2d::IRender</a></div><div class="ttdoc">渲染接口</div><div class="ttdef"><b>Definition:</b> IRender.h:13</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a0b3dd7cc95c8612468b67e2659aad82c"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a0b3dd7cc95c8612468b67e2659aad82c">SkyEngine2d::IRender::renderEnd</a></div><div class="ttdeci">virtual HRESULT renderEnd()=0</div><div class="ttdoc">结束渲染</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a8cad73ae2d9fc189a9a87e4aff40dd36"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a8cad73ae2d9fc189a9a87e4aff40dd36">SkyEngine2d::IRender::render</a></div><div class="ttdeci">virtual void render()=0</div><div class="ttdoc">渲染</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_aff991fbdd144dd0b50c2625e291598ce"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#aff991fbdd144dd0b50c2625e291598ce">SkyEngine2d::IRender::getDrawCallCount</a></div><div class="ttdeci">virtual int getDrawCallCount()=0</div><div class="ttdoc">获取当前帧的DrawCall 次数</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_direct_render_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_direct_render.html">SkyEngine2d::IDirectRender</a></div><div class="ttdoc">Direct11 绘制相关的接口</div><div class="ttdef"><b>Definition:</b> IDirectRender.h:16</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a528b41b7f60df2b6a9026fc17ec42558"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a528b41b7f60df2b6a9026fc17ec42558">SkyEngine2d::IRender::setClearColor</a></div><div class="ttdeci">virtual void setClearColor(const Color4f &amp;clear_color)=0</div><div class="ttdoc">设置清除目标时的颜色</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a33f2959a1c486554d90386e01711a6ce"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a33f2959a1c486554d90386e01711a6ce">SkyEngine2d::IRender::getVertexCount</a></div><div class="ttdeci">virtual int getVertexCount()=0</div><div class="ttdoc">获取当前帧绘制的顶点总数</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_render_command_html"><div class="ttname"><a href="class_sky_engine2d_1_1_render_command.html">SkyEngine2d::RenderCommand</a></div><div class="ttdef"><b>Definition:</b> RenderCommand.h:28</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a62cb8bc8958d370277715b08a0aee3bc"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a62cb8bc8958d370277715b08a0aee3bc">SkyEngine2d::IRender::isInit</a></div><div class="ttdeci">virtual bool isInit() const =0</div><div class="ttdoc">是否初始化</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html_a68d7983ccd9e7919f146a397090e3ac6"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html#a68d7983ccd9e7919f146a397090e3ac6">SkyEngine2d::IRender::addRenderCommand</a></div><div class="ttdeci">virtual void addRenderCommand(RenderCommand *cmd)=0</div><div class="ttdoc">添加渲染命令</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
